package com.idbk.chargestation.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

/**
 * 车主认证信息
 * 
 */
public class JsonCertification implements Parcelable {

	public final static String KEY = "JsonCertification";

	/**
	 * 审核状态：审核失败
	 */
	public final static int STATE_CERTIFICATION_FAILD = 1;
	/**
	 * 审核状态：审核中
	 */
	public final static int STATE_CERTIFICATION_IN = 2;
	/**
	 * 审核状态：审核成功
	 */
	public final static int STATE_CERTIFICATION_SUCCESS = 3;
	
	@SerializedName("id")
	public int id;//车主认证信息ID

	@SerializedName("vehicleBrandId")
	public int vehicleBrandId;//汽车品牌ID

	@SerializedName("vehicleTypeId")
	public int vehicleTypeId;//汽车型号ID

	@SerializedName("vehicleNum")
	public String vehicleNum;//车牌号

	@SerializedName("chassisNum")
	public String chassisNum;//车架号

	@SerializedName("engineNum")
	public String engineNum;//发动机编号

	@SerializedName("brandName")
	public String brandName;//汽车品牌名称

	@SerializedName("typeName")
	public String typeName;//汽车型号

	@SerializedName("photoURL")
	public String photoURL;//行驶证照片的URL

	@SerializedName("chargePort")
	public String chargePort;//充电接口类型

	@SerializedName("logoURL")
	public String logoURL;//汽车品牌Logo图片的路径

	@SerializedName("checkStatus")
	public int checkStatus;//车主认证审核状态

	@SerializedName("createTime")
	public String submitTime;//提交时间

	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		//车主认证信息ID
		dest.writeInt(id);
		//汽车品牌ID
		dest.writeInt(vehicleBrandId);		
		//汽车型号ID
		dest.writeInt(vehicleTypeId);
		//车牌号
		dest.writeString(vehicleNum);
		//车架号
		dest.writeString(chassisNum);
		//发动机编号
		dest.writeString(engineNum);
		//汽车品牌名称
		dest.writeString(brandName);
		//汽车型号
		dest.writeString(typeName);
		//行驶证照片的URL
		dest.writeString(photoURL);
		//充电接口类型
		dest.writeString(chargePort);
		//汽车品牌Logo图片的路径
		dest.writeString(logoURL);
		//车主认证审核状态
		dest.writeInt(checkStatus);
		//
		dest.writeString(submitTime);
	}
	
	public JsonCertification(){
		
	}

	public JsonCertification(Parcel in){
		//车主认证信息ID
		id = in.readInt();
		//汽车品牌ID
		vehicleBrandId = in.readInt();
		//汽车型号ID
		vehicleTypeId = in.readInt();
		//车牌号
		vehicleNum = in.readString();
		//车架号
		chassisNum = in.readString();
		//发动机编号
		engineNum = in.readString();
		//汽车品牌名称
		brandName = in.readString();
		//汽车型号
		typeName = in.readString();
		//行驶证照片的URL
		photoURL = in.readString();
		//充电接口类型
		chargePort = in.readString();
		//汽车品牌Logo图片的路径
		logoURL = in.readString();
		//车主认证审核状态
		checkStatus = in.readInt();
		//
		submitTime = in.readString();
	}

	public final static Parcelable.Creator<JsonCertification> CREATOR = new Creator<JsonCertification>() {

		@Override
		public JsonCertification[] newArray(int size) {
			// TODO Auto-generated method stub
			return new JsonCertification[size];
		}

		@Override
		public JsonCertification createFromParcel(Parcel source) {
			// TODO Auto-generated method stub
			return new JsonCertification(source);
		}
	};

}
